package cn.jimjim.framework.code.generator.common;

import java.util.List;

/**
 * @author jim
 * @date 2019-03-28
 */
public class Page<T> {

    /** 总数据量 */
    private int totalSize;

    /** 页面数量 */
    private int pageSize;

    /** 页码
     * TODO:不参与序列化
     */
    private int pageNum;

    /** 总页码 */
    private int totalPage;

    /** 当前页码 */
    private int currentPage;

    /** 是否有下一页 */
    private boolean hasNextPage;

    /** 数据 */
    private List<T> data;

    public Page() {
    }

    public Page(int pageSize, int pageNum) {
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.currentPage = pageNum;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public boolean isHasNextPage() {
        return hasNextPage;
    }

    public void setHasNextPage(boolean hasNextPage) {
        this.hasNextPage = hasNextPage;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
